﻿<?
	include("seguranca.php"); // Inclui o arquivo com o sistema de segurança
	protegePagina(); // Chama a função que protege a página
	if($_SESSION['nivel'] != 'administrador'){ //Se não for ADM desloga o usuário e expulsa da página
		expulsaVisitante();
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Cadastrar Professor</title>
    <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="../SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="css/bootstrap.css" />
</head>

<div class="container">

  	<header class="masthead">
  	<h1 class="muted" align="center">Cadastrar Professor</h1>
            
<form id="form1" name="form1" method="post" action="cadastroProfessor.php" autocomplete="on">

    <span id="sprytextfield1">
    <label for="nome">Nome:</label>
    <input type="text" name="nome" id="nome" />
    <span class="textfieldRequiredMsg">O campo é obrigatório</span></h4>
    </span>
    
    <p><span id="sprytextfield2">
    <label for="usuario">Nome de Usuário:</label>
    <input type="text" name="usuario" id="usuario" />
    <span class="textfieldRequiredMsg">O campo é obrigatório</span></span>
    </p>
    
    <p><span id="sprypassword1">
      <label for="senha">Senha:</label>
      <input type="password" name="senha" id="senha" />
    <span class="passwordRequiredMsg">O campo é obrigatório</span></span></p>
    
    <p><span id="sprytextfield4">
    <label for="email">Email:</label>
    <input type="text" name="email" id="email" />
    <span class="textfieldRequiredMsg">O campo é obrigatório</span>
    <span class="textfieldInvalidFormatMsg">Formato inválido.</span></span></p>
    
    <p><span id="sprytextfield3">
      <label for="escola">Escola:</label>
      <input type="text" name="escola" id="escola" />
    <span class="textfieldRequiredMsg">Um valor é necessário.</span></span></p>
  <p><input type="submit" name="enviar" class="btn btn-primary" value="Enviar"></p>
  
</form>
<p>&nbsp; </p>

<script type="text/javascript">
	var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
	var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
	var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
	var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email");
	var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
</script>

</body>
</html>
